package wangm.repository;

import wangm.JunitTest;
import wangm.bean.Pagination;
import wangm.bean.User;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

import static org.junit.Assert.*;

public class UserRepositoryTest extends JunitTest {

    @Autowired
    private UserRepository userRepository;

    @Test
    public void getUserList() {
        Pagination<User> pagination = new Pagination<>();
        pagination.setPageNum(1);
        pagination.setPageSize(2);
        List<User> result =  userRepository.getUserList(0,pagination);
        System.out.println(result.size());
        System.out.println(pagination.getTotal());
    }
}